package com.hopu.v1.service.front.course.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hopu.v1.pojo.course.CourseFeedback;
import com.hopu.v1.service.front.course.CourseFeedbackService;
import com.hopu.v1.mapper.front.course.CourseFeedbackMapper;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author admin
* @description 针对表【t_course_feedback(课程反馈表)】的数据库操作Service实现
* @createDate 2024-10-08 15:45:12
*/
@Service
public class CourseFeedbackServiceImpl extends ServiceImpl<CourseFeedbackMapper, CourseFeedback>
    implements CourseFeedbackService{

    @Resource
    private CourseFeedbackMapper courseFeedbackMapper;

    /**
     * 根据课程id查询课程反馈记录
     * @param id
     * @return
     */
    @Override
    public List<CourseFeedback> selectFeedbackByCourseId(Integer id,String studentId) {
        return courseFeedbackMapper.selectFeedbackByCourseId(id,studentId);
    }

    /**
     * 添加学生反馈（根据学生id和课程id）
     * @param courseFeedback
     * @return
     */
    @Override
    public Object insertFeedbackByStudentIdAndCourseId(CourseFeedback courseFeedback) {
        courseFeedbackMapper.insertFeedbackByStudentIdAndCourseId(courseFeedback);
        return null;
    }
}




